package com.koron.css2.newProjectCenter.Enum;

import lombok.AllArgsConstructor;
import lombok.Getter;

@Getter
@AllArgsConstructor
public enum PjCollectionPaymentStatus {

    BEFORECOLLECTION(0, "待审批"),
    COLLECTION(1,"待收款"),
    AFTERCOLLECTION(2,"已收款"),
    FQ(3,"已废弃");

    /**
     * 状态
     */
    private Integer status;
    /**
     * 状态名称
     */
    private String name;

    public static String getNameByStatus(Integer status) {
        String result;
        if (status.equals(PjCollectionPaymentStatus.BEFORECOLLECTION.getStatus())) {
            result = PjCollectionPaymentStatus.BEFORECOLLECTION.getName();
        } else if (status.equals(PjCollectionPaymentStatus.COLLECTION.getStatus())) {
            result = PjCollectionPaymentStatus.COLLECTION.getName();
        } else if (status.equals(PjCollectionPaymentStatus.AFTERCOLLECTION.getStatus())) {
            result = PjCollectionPaymentStatus.AFTERCOLLECTION.getName();
        }else if (status.equals(PjCollectionPaymentStatus.FQ.getStatus())) {
            result = PjCollectionPaymentStatus.FQ.getName();
        } else {
            result = null;
        }
        return result;
    }
}
